<?php
	header("Content-Type: text/html;charset=utf-8");
	include("function/_nosql.php"); //
	include("function/function.php");
	$kboy_userid = $_SESSION['kboy_userid'];
	$kboy_user = $_SESSION['kboy_user'];

	$uid = chkstr(trim($_REQUEST['uid']));
	if(empty($uid)){
		echo erro("参数错误");
	}
	if(!is_numeric($uid)){
		echo erro("参数错误");
	}
	if(getNewsNums("kboy_user","uid=$uid") <1){
		echo erro("参数错误");
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的收藏_社区_<?= $web_titles ?></title>
<meta name="Keywords" content="我的收藏,社区,<?= $web_keywords ?>" />
<meta name="Description" content="<?= $web_description ?>" />
<link rel="stylesheet" href="css/common.css"/>
<link rel="stylesheet" href="css/sq.css"/>
<script type="text/javascript" src="js/baidutongji.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>
</head>
<body>
    <!--top-bar begin-->
	<? include("_include.top.topbar.php") ?>
    <!--top-bar end-->
    <!--header begin-->
	<? include("_include.top.navbar.php") ?>
    <!--header end-->
    <!--banner begin-->
	<? include("_include.forum.banners.php") ?>
    <!--banner end-->
    <!--活动 begin-->
    <div class="sq-wrap">
		<? include("_include.forum.title.php") ?>
        <div class="sq-bd">
			<? include("_include.forum.topnav.php") ?>
            <div class="sq-bd-con">
                <div class="fn-feed-container">
                    <div class="feed-inner">
                        <div class="travel-hd">
                            <div class="title">我的收藏</div>
                        </div>
                        <ul class="feed_friend_list">
						
						<?php
								$SQL = "";
								$pagesize = 10; // 分页数量
								$pageval = chkstr(trim($_REQUEST['page'])); // 获取Page的值
								if($pageval){
									if(!is_numeric($pageval)){
										echo erro("Page Error");
									}
									if($pageval <= 1){
										$pageval = 1;
									}
									$page = ($pageval-1) * $pagesize;
									$page .= ",";
								}else{
									$pageval = 1;
								}
								
								$pagesql = "select * from kboy_forum_favorite where uid=$uid order by id desc";
								$pagenum = mysql_num_rows(mysql_query($pagesql)); // 总记录数
								$pagecount = ceil($pagenum/$pagesize); // 共分多少页
								if($pageval > $pagecount){
									$pageval = $pagecount;
								}
								
								$news_sql = $pagesql." limit $page $pagesize";
								$news_rows = mysql_query($news_sql);
								$i = 1;
								while($news_rs = mysql_fetch_array($news_rows)){
						?>
                            <li class="f-single f-single_c">
                                <div class="f-aside">
                                    <div class="f-user-pto">
                                        <a href="forum_news.php?uid=<?=$news_rs['uid']?>" target="_blank">
                                            <img src="<?=getClassName("kboy_user","user_face","uid=".$news_rs['uid'])?>" width="58" height="58" alt=""/>
                                        </a>
                                    </div>
                                    <div class="f-user-info">
                                        <div class="f-nick"><a href="forum_news.php?uid=<?=$news_rs['uid']?>"><?=getUserNickName($news_rs['uid'])?></a>&nbsp;&nbsp;留言</div>
                                    </div>
                                </div>
                                <div class="f-wrap">
                                    <div class="f-item">
                                        <div class="f-info"><?=getClassName("kboy_forum_news","news_text","id=".$news_rs['newsid'])?></div>
                                    </div>
                                </div>
                                <div class="f-operate">
                                    <span class="time"><?=$news_rs['favorite_addtime']?></span>
                                    
                                </div>
                            </li>
						<?php
								} // while 完毕
						?>
							
                        </ul>
						<?php
								if($pagenum > $pagesize){
									echo "<div class=\"pagination\"><ul>";
									$url = "forum_favorite.php?uid=$uid";//当前页面
									pagebar($pagecount, $pageval, 7, $url);
									echo "</ul></div>";
								}
						?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--foot begin-->
	<? include("_include.bottom.footbar.php") ?>
    <!--foot begin-->
    <!--左侧悬浮 begin-->
	<? include("_include.bottom.leftbar.php") ?>
    <!--左侧悬浮 end-->
    <!--右侧悬浮导航 begin-->
	<? include("_include.bottom.rightbar.php") ?>
    <!--右侧悬浮导航 end-->
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
    <script type="text/javascript" src="js/sq.js"></script>
</body>
</html>

